<?php

declare(strict_types=1);

/**
 * @Author:     Frank
 * @contact     frank_hhm@163.com
 * @Date:       2022-12-30 16:05:02
 * @Last Modified time: 2023-02-18 16:47:30
 */
namespace app\common\utils\store;

use frank\utils\helper\ArrayHelper;
/**
 * Class DiyPageUtils
 */
class DiyPageUtils
{


    public static function getDefaultData(){
        $data = [
                'page' => static::getPage(), 
                'items' => [],
            ];
        return $data;
    }

	/**
     * 页面diy元素默认数据
     * @return array
     */
    public static function getDefaultItems(){
    	return [
            'pop_adv'=> static::getPopAdv(),
    		'goods'=>static::getGoods(),
    		'window'=>static::getWindow(),
    		'single'=>static::getSingle(),
    		'banner'=>static::getBanner(),
    		'title'=>static::getTitle(),
    		'notice'=>static::getNotice(),
    		'nav_bar'=>static::getNavBar(),
    		'search'=>static::getSearch(),
    		'guide'=>static::getGuide(),
            'user' => static::getUser(), 
            'order' => static::getOrder(), 
    	];
    }


    public static function getPage(){
    	return [
	        'name' => '页面设置',
	        'type' => 'page',
	        'temp'=>[
	        	'value'=>1,
	        	'title'=>'风格一'
	        ],
	        'title' => [
	            'text' => '页面标题',
	            'style' => [
                    'position'=>'center',
                    'img' => '',
                    'bg' => '#F5F5F5',
                    'color' => '#000000',
                    'opacity'=> 0,
                    'search_bg' => '#000000',
                    'search_opacity'=> 0.09
                ],
                'link' => []
	        ],
	        'style' => [
	            'bg' => '#F5F5F5',
	            'img_status' => 0,
	            'img' => '',
	        ],
	        'wxapp'=>[
                'color'=>'#ffffff',
                'collect'=>1,
	        	'share'=>[
	        		'	'=>baseUrl().'/static/common/image/diy/wxapp-share-cover.png',
                    'thumb'=>baseUrl().'/static/common/image/diy/wxapp-share-thumb.png',
                    'title'=>'搞事情哦！商城上线了',
	        	]
	        ]
	    ];
    }


	/**
	 * 商品列表
	 */
	public static function getGoods(){
		return [
			'name' => '商品列表',
            'type' => 'goods',
            'params' => [
                'source' => 'auto',
                'cate_id' => [],
                'goods_id' => [],
                'limit' => 6,
                'sort' => 'all',//all; sales; price
                
            ],
            'layout'=>[
            	'value' => 2,
                'border'=>1,
                'scroll'=>0,
            ],
            'style' => [
                'pt' => 0,
                'pb' => 0,
                'pl' => 0,
                'pr' => 0,
                'mt'=>0,
                'mb'=>0,
                'ml'=>0,
                'mr'=>0,
                't_radius'=>0,
                'b_radius'=>0,
                'bg_status'=>0,
                'bg' => '#ffffff',
                'shade'=>0,
                'item_radius'=> 0,
                'item_border_color'=> '#f0f0f0',
                'item_pm'=> 5,
                'item_fill'=> 1,
                'item_bold'=> 0,
            ],
            'other'=>[
            	'show' => [
                    'goods_name' => 1,
                    'goods_price' => 1,
                    'market_price' =>1,
                    'goods_sales' =>1,
                    'cart'=>0,
                    'label'=>0,
                ],
                'label' => [
                    'type'=>'new',
                    'layout'=>1,
                    'img'=>'',
                ],
                'cart' => [
                    'layout'=>1,
                    'title'=>'购买'
                ],
            ],
            'default_data' =>[
                'goods_name' => '此处显示商品名称，最多显示2行',
                'goods_image' => baseUrl().'/static/common/image/diy/goods/01.png',
                'goods_stock' => '99',
                'goods_price' => '99.00',
                'market_price' => '139.00',
                'selling_point' => '这里显示商品描述，最多显示1行',
                'goods_sales' => '100',
            ],
            'data'=>[]

		];
	}


    public static function getPopAdv(){
    	return [
	        'name' => '弹窗广告',
	        'type' => 'pop_adv',
	        'cache'=>time(),
	        'img'=>'',
	        'link'=>[],
	        'layout'=>1,
	    ];
	}

	/**
	 * 橱窗魔方
	 */
	public static function getWindow(){
		return [
			'name' => '魔方',
            'type' => 'window',
            'layout'=>[
	            'value'=>1,
            ],
	        'style'=>[
	            'img_gap'=>0,
	            'img_shade'=>0,
	            'img_radius'=>0,
                'bg_status'=>0,
                'bg' => '#ffffff',
                'shade'=>0,
                't_radius'=>0,
                'b_radius'=>0,
                'pt' => 0,
                'pb' => 0,
                'pl' => 0,
                'pr' => 0,
                'mt'=>0,
                'mb'=>0,
                'ml'=>0,
                'mr'=>0,
	        ],
	        'data' => [
	            [
	                'img' => baseUrl().'/static/common/image/diy/window/01.jpg',
	                'link' => []
	            ],
	            [
	                'img' => baseUrl().'/static/common/image/diy/window/02.jpg',
	                'link' => []
	            ],
	            [
	                'img' => baseUrl().'/static/common/image/diy/window/03.jpg',
	                'link' => []
	            ],
	            [
	                'img' => baseUrl().'/static/common/image/diy/window/04.jpg',
	                'link' => []
	            ]
	        ]
		];
	}

	/**
	 * 单图
	 */
	public static function getSingle(){
		return [
			'name'=>'单图',
			'type'=>'single',
            'style' => [
                'bg_status'=>'0',
                'bg' => '#ffffff',
                'shade'=>0,
                't_radius'=>0,
                'b_radius'=>0,
                'pt' => 0,
                'pb' => 0,
                'pl' => 0,
                'pr' => 0,
                'mt'=>0,
                'mb'=>0,
                'ml'=>0,
                'mr'=>0,
            ],
			'img' => baseUrl().'/static/common/image/diy/banner.png',
            'link' => []
		];
	}

	/**
	 * 图片轮播
	 */
	public static function getBanner(){
		return [
			'name'=>'图片轮播',
			'type' => 'banner',
            'style' => [
                'bg_status'=>0,
                'bg' => '#ffffff',
                'radius'=>0,
                'shade'=> 0,
                't_radius'=>0,
                'b_radius'=>0,
                'pt' => 0,
                'pb' => 0,
                'pl' => 0,
                'pr' => 0,
                'mt'=>0,
                'mb'=>0,
                'ml'=>0,
                'mr'=>0,
            ],
            'default_data' =>[
                'img' => baseUrl().'/static/common/image/diy/banner.png',
                'link' => []
            ],
            'data'=>[
            	[
	                'img' => baseUrl().'/static/common/image/diy/banner.png',
	                'link' => []
	            ]
	        ]
		];
	}

	/**
	 * 标题栏
	 */
	public static function getTitle(){
		return [
	        'name' => '标题栏',
	        'type' => 'title',
	        'title' => '『标题栏』',
	        'temp'=>[
	            'title'=>'模版一',
	            'value'=>1
	        ],
	        'style' => [
                't_radius'=>0,
                'b_radius'=>0,
                'pt' => 0,
                'pb' => 0,
                'pl' => 0,
                'pr' => 0,
                'mt'=>0,
                'mb'=>0,
                'ml'=>0,
                'mr'=>0,
	            'fz'=>12,
	            'fw'=>0,
	            'color' => '#000000',
	            'bg_status'=>0,
	            'bg' => '#ffffff',
	            'move_status'=>0,
	            'move_bg' => '#000000',
	            'move_color' => '#777777',
	            'move_text' => '查看更多',
	            'shade'=>0
	        ],
		];
	}

	/**
	 * 公告
	 */
	public static function getNotice(){
		return [		
			'name' => '公告',
            'type' => 'notice',
            'params' => [
                'source' => 'auto'
            ],
            'temp' => [
                'title' => '模版一',
                'value'=> 1
            ],
            'style'=> [
				'icon'=> baseUrl().'/static/common/image/diy/notice.png',
				'color'=>"#000000",
                'bg_status'=> 0,
                'bg' => '#ffffff',
	            'shade'=>0,
                't_radius'=>0,
                'b_radius'=>0,
                'pt' => 0,
                'pb' => 0,
                'pl' => 0,
                'pr' => 0,
                'mt'=>0,
                'mb'=>0,
                'ml'=>0,
                'mr'=>0,
            ],
            'default_data' => [
                'title' =>'开学啦丨喝牛奶，要新鲜，你选对牛奶了吗？',
                'link' => []
            ],
            'data' => [
            	[
	                'title' =>'开学啦丨喝牛奶，要新鲜，你选对牛奶了吗？',
	                'link' => []
	            ],
            ]
        ];
	}

	/**
	 * 图文导航
	 */
	public static function getNavBar(){
		return [
			'name' => '图文导航',
            'type' => 'nav_bar',
            'layout' => [
                'value' => 1,
                'rows_num' => 4,
            ],
            'style' => [
                'bg_status'=>0,
                'bg' => '#ffffff',
                'shade'=>0,
                't_radius'=>0,
                'b_radius'=>0,
                'pt' => 0,
                'pb' => 0,
                'pl' => 0,
                'pr' => 0,
                'mt'=>0,
                'mb'=>0,
                'ml'=>0,
                'mr'=>0,
            ],
            'default_data' => [
                'img' => baseUrl().'/static/common/image/diy/navbar/01.png',
                'link' => '',
                'title' => '按钮文字',
                'fw' => 0,
                'color' => '#000000'
            ],
            'data'=>[
            	[
	                'img' => baseUrl().'/static/common/image/diy/navbar/01.png',
	                'link' => '',
	                'title' => '按钮文字1',
	                'fw' => 0,
	                'color' => '#000000'
	            ],
            	[
	                'img' => baseUrl().'/static/common/image/diy/navbar/01.png',
	                'link' => '',
	                'title' => '按钮文字2',
	                'fw' => 0,
	                'color' => '#000000'
	            ],
            	[
	                'img' => baseUrl().'/static/common/image/diy/navbar/01.png',
	                'link' => '',
	                'title' => '按钮文字3',
	                'fw' => 0,
	                'color' => '#000000'
	            ],
            	[
	                'img' => baseUrl().'/static/common/image/diy/navbar/01.png',
	                'link' => '',
	                'title' => '按钮文字4',
	                'fw' => 0,
	                'color' => '#000000'
	            ]
            ],
		];
	}

	/**
	 * 搜索框
	 */
	public static function getSearch(){
		return [
			'name' => '搜索框',
            'type' => 'search',
            'layout'=>[
                'value' => 1,
            ],
            'style' => [
                'title' => '搜索',
                'icon'=>baseUrl().'/static/common/image/diy/notice.png',
                'bg_status'=>0,
                'bg' => '#ffffff',
                'shade'=>0,
                'search_bg' => '#f0f0f0',
                'search_radius'=>0,
                'search_position'=>'center',
                't_radius'=>0,
                'b_radius'=>0,
                'pt' => 10,
                'pb' => 10,
                'pl' => 10,
                'pr' => 10,
                'mt'=>0,
                'mb'=>0,
                'ml'=>0,
                'mr'=>0,
            ],
		];
	}

	/**
	 * 辅助线
	 */
	public static function getGuide(){
		return [
			'name'=>'辅助线',
			'type'=>'guide',
			'layout'=>[
				'value'=>'solid',
			],
			'style'=>[
				'color'=>'#000000',
				'lh'=>1,
				'bg_status'=>0,
				'bg'=>'#F0F0F0',
                'shade'=>0,
                'pt' => 10,
                'pb' => 10,
                'pl' => 10,
                'pr' => 10,
                'mt'=>0,
                'mb'=>0,
                'ml'=>0,
                'mr'=>0,
                't_radius'=>0,
                'b_radius'=>0,
			]
		];
	}



	/**
	 * 链接数据
	 */
	public static function getLinkLists(){
		$linkLists = [
			[
	        	'title'=>'基础链接',
	            'data'=>[
	                [
	                    'title'=>'主页',
	                    'key'=> 'store_home',
	                ],
	                [
	                    'title'=>'分类',
	                    'key'=> 'store_goods_categroy',
	                ],
	                [
	                    'title'=>'购物车',
	                    'key'=> 'store_cart',
	                ],
	                [
	                    'title'=>'个人中心',
	                    'key'=> 'store_user',
	                ]
	            ]
	        ],
	        [
	        	'title'=>'会员中心',
	            'data'=>[
	                [
	                    'title'=>'我的钱包',
	                    'key'=> 'store_user_wallet',
	                ],
	                [
	                    'title'=>'我的账单',
	                    'key'=> 'store_user_water',
	                ],
	                [
	                    'title'=>'我的地址',
	                    'key'=> 'store_user_address',
	                ],
	                [
	                    'title'=>'我的收藏',
	                    'key'=> 'store_user_collection',
	                ],
	                [
	                    'title'=>'我的足迹',
	                    'key'=> 'store_user_footprint',
	                ],
	            ]
	        ],

	        [
	        	'title'=>'订单中心',
	            'data'=>[
	                [
	                    'title'=>'全部订单',
	                    'key'=>'store_user_order',
                        'value'=>'all'
	                ],
                    [
                        'title'=>'待付款',
                        'key'=>'store_user_order',
                        'value'=>'payment'
                    ],
                    [
                        'title'=>'待发货',
                        'key'=>'store_user_order',
                        'key'=>'delivery'
                    ],
                    [
                        'title'=>'待收货',
                        'key'=>'store_user_order',
                        'key'=>'received'
                    ],
                    [
                        'title'=>'待评价',
                        'key'=>'store_user_order',
                        'key'=>'comment'
                    ]
	            ]
	        ],
	        [
	        	'title'=>'其他',
	            'data'=>[
	                [
	                    'title'=>'搜索页',
	                    'key'=> 'store_search',
	                ],
	            ]
	        ]
	    ];
        return $linkLists;
	}


	public static function getNavdesign(){
		return [
            'name' => '商城导航',
            'type' => 'navdesign',
            'layout'=>[
                'value'=> 1
            ],
            'style' => [
                'bg'=>'#ffffff',
                'color'=>'#000000',
                'cur_color'=>'#000000',
            ],
            'data'=>[
                [
                    'icon' => baseUrl().'/static/common/image/diy/navdesign/home.png',
                    'icon_cur' => baseUrl().'/static/common/image/diy/navdesign/home_cur.png',
                    'title' => '首页',
                    'link' => [
                        'data_key'=>"store_page",
                        'desc'=>"商城链接",
                        'key'=>"store_home",
                        'title'=>"主页",
                        'value'=>"0",
                    ]
                ],
                [
                    'icon' => baseUrl().'/static/common/image/diy/navdesign/cate.png',
                    'icon_cur' => baseUrl().'/static/common/image/diy/navdesign/cate_cur.png',
                    'title' => '分类',
                    'link' => [
                        'data_key'=>"store_page",
                        'desc'=>"商城链接",
                        'key'=>"store_goods_category",
                        'title'=>"商品分类"
                    ]
                ],
                [
                    'icon' => baseUrl().'/static/common/image/diy/navdesign/card.png',
                    'icon_cur' => baseUrl().'/static/common/image/diy/navdesign/card_cur.png',
                    'title' => '购物车',
                    'link' => [
                        'data_key'=>"store_page",
                        'desc'=>"商城链接",
                        'key'=>"store_cart",
                        'title'=>"购物车"
                    ]
                ],
                [
                    'icon' => baseUrl().'/static/common/image/diy/navdesign/user.png',
                    'icon_cur' => baseUrl().'/static/common/image/diy/navdesign/user_cur.png',
                    'title' => '个人中心',
                    'link' => [
                        'data_key'=>"store_page",
                        'desc'=>"商城链接",
                        'key'=>"store_user",
                        'title'=>"个人中心"
                    ]
                ],
            ]
        ];
	}

	/**
	 * 分类风格
	 */
    public static function getCategroy(){
        $data = [
            [
                'level'=>1,
                'title'=>'一级分类样式',
                'data'=>[
                    [
                        'layout'=>'1_1',
                        'img'=>baseUrl().'/static/common/image/diy/cate/1_1.jpg',
                    ],
                    [
                        'layout'=>'1_2',
                        'img'=>baseUrl().'/static/common/image/diy/cate/1_2.jpg',
                    ],
                    [
                        'layout'=>'1_3',
                        'img'=>baseUrl().'/static/common/image/diy/cate/1_3.jpg',
                    ],
                    [
                        'layout'=>'1_4',
                        'img'=>baseUrl().'/static/common/image/diy/cate/1_4.jpg',
                    ],
                ]
            ],
            [
                'level'=>2,
                'title'=>'二级分类样式',
                'data'=>[
                    [
                        'layout'=>'2_1',
                        'img'=>baseUrl().'/static/common/image/diy/cate/2_1.jpg',
                    ],
                    [
                        'layout'=>'2_2',
                        'img'=>baseUrl().'/static/common/image/diy/cate/2_2.jpg',
                    ],
                    [
                        'layout'=>'2_3',
                        'img'=>baseUrl().'/static/common/image/diy/cate/2_3.jpg',
                    ],
                ]
            ],
            [
                'level'=>3,
                'title'=>'三级级分类样式',
                'data'=>[
                    [
                        'layout'=>'3_1',
                        'img'=>baseUrl().'/static/common/image/diy/cate/3_1.jpg',
                    ],
                    [
                        'layout'=>'3_2',
                        'img'=>baseUrl().'/static/common/image/diy/cate/3_2.jpg',
                    ],
                    [
                        'layout'=>'3_3',
                        'img'=>baseUrl().'/static/common/image/diy/cate/3_3.jpg',
                    ],
                ]
            ]
        ];
        return $data;
    }


    public static function getUser(){
    	return [
	        'name' => '个人中心',
            'type' => 'user',
	        'temp'=>[
	            'title'=>'模版一',
	            'value'=>1
	        ],
            'style' => [
                'color'=>"#000000",
                'text_color'=>"#000000",
                'desc_color'=>"#777777",
                'bg_status'=>0,
                'bg_img'=>baseUrl().'/static/common/image/diy/user-style-bg.png',
                'bg' => '#ffffff',
                'bg2' => '#ffffff',
                'deg' => 48,
                'shade'=>0,
                'pt' => 10,
                'pb' => 10,
                'pl' => 10,
                'pr' => 10,
                'mt'=>0,
                'mb'=>0,
                'ml'=>0,
                'mr'=>0,
                't_radius'=>0,
                'b_radius'=>0,
            ],
            'data'=>[
                'login_text' => '授权登录',
                'login_desc' => '可以体验更多',
                'default'=>baseUrl().'/static/common/image/diy/default.png',
            ],

            'other'=>[
            	'wallet'=>[
	            	'show'=>1,
	            	'data'=>[
		                [
		                    'name'=>'point',
		                    'title'=>'积分'
		                ],[
		                    'name'=>'coupon',
		                    'title'=>'优惠卷',
		                ],[
		                    'name'=>'wallet',
		                    'title'=>'钱包',
		                ]
		            ]
	            ]
            ]
	    ];
    }

    /**
     * 我的订单
     */
    public static function getOrder(){
    	return [
	        'name' => '我的订单',
            'type' => 'order',
            'style' => [
                'bg_status'=>0,
                'bg' => '#ffffff',
                'shade'=>0,
                'pt' => 10,
                'pb' => 10,
                'pl' => 10,
                'pr' => 10,
                'mt'=>0,
                'mb'=>0,
                'ml'=>0,
                'mr'=>0,
                't_radius'=>0,
                'b_radius'=>0,
            ],
        	'data'=>[
                [
                    'name'=>'payment',
                    'title'=>'待支付',
                    'icon'=>baseUrl().'/static/common/image/diy/order/payment.png',
	                'style'=>[
		                'color'=>"#000000",
		                'fw'=>0
		            ],
                ],[
                    'name'=>'delivery',
                    'title'=>'待发货',
                    'icon'=>baseUrl().'/static/common/image/diy/order/delivery.png',
	                'style'=>[
		                'color'=>"#000000",
		                'fw'=>0
		            ],
                ],[
                    'name'=>'receipt',
                    'title'=>'待收货',
                    'icon'=>baseUrl().'/static/common/image/diy/order/receipt.png',
	                'style'=>[
		                'color'=>"#000000",
		                'fw'=>0
		            ],
                ],[
                    'name'=>'comment',
                    'title'=>'待评价',
                    'icon'=>baseUrl().'/static/common/image/diy/order/comment.png',
	                'style'=>[
		                'color'=>"#000000",
		                'fw'=>0
		            ],
                ],[
                    'name'=>'refund',
                    'title'=>'售后',
                    'icon'=>baseUrl().'/static/common/image/diy/order/return.png',
	                'style'=>[
		                'color'=>"#000000",
		                'fw'=>0
		            ],
                ]
            ]
	    ];
    }

    /**
     * 获取风格主题
     */
	public static function getThemes(?string $theme = ''){
        $data = [
            [
                'theme'=>1,
                'title'=>'红',
                'data'=>[
                    'host_bg'=>'#ff2626',
                    'host_bg2'=>'#fe762e',
                    'host_color'=>'#ffffff',
                    'deputy_bg'=>'#fef5f6',
                    'deputy_color'=>'#ff2626'
                ],
                'img' => [
                    baseUrl().'/static/common/image/diy/layout/1/1.jpg',
                    baseUrl().'/static/common/image/diy/layout/1/2.jpg',
                    baseUrl().'/static/common/image/diy/layout/1/3.jpg',
                    baseUrl().'/static/common/image/diy/layout/1/4.jpg',
                    baseUrl().'/static/common/image/diy/layout/1/5.jpg'
                ]
            ],
            [
                'theme'=>2,
                'data'=>[
                    'host_bg'=>'#8a22ff',
                    'host_bg2'=>'#ad65ff',
                    'host_color'=>'#ffffff',
                    'deputy_bg'=>'#faf3ff',
                    'deputy_color'=>'#8a22ff'
                ],
                'img' => [
                    baseUrl().'/static/common/image/diy/layout/2/1.jpg',
                    baseUrl().'/static/common/image/diy/layout/2/2.jpg',
                    baseUrl().'/static/common/image/diy/layout/2/3.jpg',
                    baseUrl().'/static/common/image/diy/layout/2/4.jpg',
                    baseUrl().'/static/common/image/diy/layout/2/5.jpg'
                ]
            ],
            [
                'theme'=>3,
                'data'=>[
                    'host_bg'=>'#ff522f',
                    'host_bg2'=>'#ffb32f',
                    'host_color'=>'#ffffff',
                    'deputy_bg'=>'#fff2ef',
                    'deputy_color'=>'#ff522f'
                ],
                'img' => [
                    baseUrl().'/static/common/image/diy/layout/3/1.jpg',
                    baseUrl().'/static/common/image/diy/layout/3/2.jpg',
                    baseUrl().'/static/common/image/diy/layout/3/3.jpg',
                    baseUrl().'/static/common/image/diy/layout/3/4.jpg',
                    baseUrl().'/static/common/image/diy/layout/3/5.jpg'
                ]
            ],
            [
                'theme'=>4,
                'data'=>[
                    'host_bg'=>'#ff9c23',
                    'host_bg2'=>'#fcb840',
                    'host_color'=>'#ffffff',
                    'deputy_bg'=>'#fff3e4',
                    'deputy_color'=>'#ff9c23'
                ],
                'img' => [
                    baseUrl().'/static/common/image/diy/layout/4/1.jpg',
                    baseUrl().'/static/common/image/diy/layout/4/2.jpg',
                    baseUrl().'/static/common/image/diy/layout/4/3.jpg',
                    baseUrl().'/static/common/image/diy/layout/4/4.jpg',
                    baseUrl().'/static/common/image/diy/layout/4/5.jpg'
                ]
            ],
            [
                'theme'=>5,
                'data'=>[
                    'host_bg'=>'#2cba24',
                    'host_bg2'=>'#45dd3d',
                    'host_color'=>'#ffffff',
                    'deputy_bg'=>'#ecffeb',
                    'deputy_color'=>'#2cba24'
                ],
                'img' => [
                    baseUrl().'/static/common/image/diy/layout/5/1.jpg',
                    baseUrl().'/static/common/image/diy/layout/5/2.jpg',
                    baseUrl().'/static/common/image/diy/layout/5/3.jpg',
                    baseUrl().'/static/common/image/diy/layout/5/4.jpg',
                    baseUrl().'/static/common/image/diy/layout/5/5.jpg'
                ]
            ],
            [
                'theme'=>6,
                'data'=>[
                    'host_bg'=>'#ff2145',
                    'host_bg2'=>'#f24b66',
                    'host_color'=>'#ffffff',
                    'deputy_bg'=>'#ffdfe4',
                    'deputy_color'=>'#ff2145'
                ],
                'img' => [
                    baseUrl().'/static/common/image/diy/layout/6/1.jpg',
                    baseUrl().'/static/common/image/diy/layout/6/2.jpg',
                    baseUrl().'/static/common/image/diy/layout/6/3.jpg',
                    baseUrl().'/static/common/image/diy/layout/6/4.jpg',
                    baseUrl().'/static/common/image/diy/layout/6/5.jpg'
                ]
            ],
            [
                'theme'=>7,
                'data'=>[
                    'host_bg'=>'#3c6cff',
                    'host_bg2'=>'#6d8ef3',
                    'host_color'=>'#ffffff',
                    'deputy_bg'=>'#eaefff',
                    'deputy_color'=>'#3c6cff'
                ],
                'img' => [
                    baseUrl().'/static/common/image/diy/layout/7/1.jpg',
                    baseUrl().'/static/common/image/diy/layout/7/2.jpg',
                    baseUrl().'/static/common/image/diy/layout/7/3.jpg',
                    baseUrl().'/static/common/image/diy/layout/7/4.jpg',
                    baseUrl().'/static/common/image/diy/layout/7/5.jpg'
                ]
            ],
        ];
        if(!empty($theme)){
            return ArrayHelper::getArrayItemByColumn($data,'theme',$theme)['data'];
        }
        return $data;
    }



    /**
     * 获取工具栏
     */
    public static function getToolsData(string $key){;
    	$common = [
            'title'=>"基础组件",
            'active'=>true,
            'data'=>[
            	[
                    'title'=>"弹窗广告",
                    'key'=>"pop_adv",
    				'only'=>true,
                    'icon'=>"icon icon-danchuang",
	            ],
	            [
                    'title'=>"橱窗魔方",
                    'key'=>"window",
                    'icon'=>"icon icon-grid",
	            ],
	            [
                    'title'=>"单图",
                    'key'=>"single",
                    'icon'=>"icon icon-img",
	            ],
	            [
                    'title'=>"图片轮播",
                    'key'=>"banner",
                    'icon'=>"icon icon-banner",
	            ],
	            [
                    'title'=>"标题栏",
                    'key'=>"title",
                    'icon'=>"icon icon-title",
	            ],
	            [
                    'title'=>"公告",
                    'key'=>"notice",
                    'icon'=>"icon icon-gonggao",
	            ],
	            [
                    'title'=>"图文导航",
                    'key'=>"nav_bar",
                    'icon'=>"icon icon-fenlei-2",
	            ],
	            [
                    'title'=>"搜索框",
                    'key'=>"search",
                    'icon'=>"icon icon-sousuo-1",
	            ],
	            [
                    'title'=>"辅助线",
                    'key'=>"guide",
                    'icon'=>"icon icon-jian",
	            ],
	        ],
	    ];
		$tools = [
			'page'=>[
				[
	                'title'=>"商城组件",
	                'active'=>true,
	                'data'=>[
			            [
	                        'title'=>"商品列表",
	                        'key'=>"goods",
	                        'icon'=>"icon icon-gouwu",
			            ],
			        ],
			    ],
				//[
				//     'title'=>"营销组件",
				//      'data'=>[],
				//],
			],
			'user'=>[
				[
	                'title'=>"页面组件",
	                'active'=>true,
	                'data'=>[
			            [
	                        'title'=>"个人中心",
	                        'key'=>"user",
	                		'only'=>true,
	                        'icon'=>"icon icon-wode-2",
			            ],
			            [
	                        'title'=>"我的订单",
	                        'key'=>"order",
	                		'only'=>true,
	                        'icon'=>"icon icon-order",
			            ],
			        ]
			    ],
			]
		];
		foreach($tools as &$item){
			$item[] = $common;
		}
    	return $tools[$key] ?? [];
    }
	/**
	 * 模板
	 */
	public static function getTempLists($type = ''){
		$data = [
			'page'=>[
				[
					'value'=>1,
		            'title'=>'风格一',
		            'img'=>baseUrl().'/static/common/image/diy/head-layout/1.jpg'
				],
				[
					'value'=>2,
		            'title'=>'风格二',
		            'img'=>baseUrl().'/static/common/image/diy/head-layout/2.jpg'
				],
				[
					'value'=>3,
		            'title'=>'风格三',
		            'img'=>baseUrl().'/static/common/image/diy/head-layout/3.jpg'
				]
			],
			'title'=>[
				[
					'value'=>1,
					'title'=>'模板一',
					'img'=> baseUrl().'/static/common/image/diy/temp/title/1.png',
				],
				[
					'value'=>2,
					'title'=>'模板二',
					'img'=>baseUrl().'/static/common/image/diy/temp/title/2.png',
				],
				[
					'value'=>3,
					'title'=>'模板三',
					'img'=>baseUrl().'/static/common/image/diy/temp/title/3.png',
				],
				[
					'value'=>4,
					'title'=>'模板四',
					'img'=>baseUrl().'/static/common/image/diy/temp/title/4.png',
				],
				[
					'value'=>5,
					'title'=>'模板五',
					'img'=>baseUrl().'/static/common/image/diy/temp/title/5.png',
				],
			],
			'user'=>[
				[
					'value'=>1,
		            'title'=>'风格一',
		            'img'=>baseUrl().'/static/common/image/diy/head-layout/1.jpg'
				],
				[
					'value'=>2,
		            'title'=>'风格二',
		            'img'=>baseUrl().'/static/common/image/diy/head-layout/2.jpg'
				],
				[
					'value'=>3,
		            'title'=>'风格三',
		            'img'=>baseUrl().'/static/common/image/diy/head-layout/3.jpg'
				]
			],

		];
		return $data[$type] ?? [];
	}
}